import modal from './modal'
import { ModalType } from './modal.d';

// Vue3挂载全局API
export default function installPlugins(app: any) {
    // 模态框对象
    app.config.globalProperties.$modal = modal as ModalType
    // 事件监听
    // 挂载全局参数
    app.config.globalProperties.$env = 'development';
    // 挂载全局方法
    app.config.globalProperties.$filters = {
        format<T extends any>(str: T): string {
            console.log('main.ts :>> ', 'globalProperties.$filters >>>>', str)
            return `$${str}`
        }
    }
}